package com.cn.stusy0015.demo0016;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName NameGet.java
 * @Description
 * @createTime 2023年05月20日 17:01:00
 */
public class NameGet {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入姓名：");
        String name = sc.next();

        String surname= name.substring(0, 1);
        String firstName = name.substring(1);
        System.out.println("姓名："+name);
        System.out.println("姓："+surname);
        System.out.println("名："+firstName);
    }
}
